#pragma once
#include <iostream>
// 退出码设置
enum ExitCode{
    OK = 0,
    USAGE_ERR,
    SOCKET_ERR,
    BIND_ERR,
    LISTEN_ERR,
    CONNECT_ERR,
    FORK_ERR,
    OPEN_ERR
};
// 设计一个不能被拷贝构造和赋值的类，继承了这个类的类就不能实现拷贝操作了
class NoCopy {
public:
    NoCopy() { }
    ~NoCopy() { }
    NoCopy(const NoCopy&) = delete;
    const NoCopy& operator = (const NoCopy&) = delete;
};

#define CONV(addr) ((struct sockaddr*)&addr)